(a) Technical Field
This invention relates to a network printing system, a host terminal and a network printer, especially to a system adapting a printer to be connected to a network for common use by a plurality of host terminals.
(b) Description of the Related Art
A network printing system is conventionally used in which a printer connected to a network such as LAN and WAN is adapted to be shared by a plurality of host terminals. A printer for such use is called a network printer. A network printer is usually connected to a network via a print server. Another network printer having a built-in print server is directly connected to a network.
In the network printing system, in response to a print command issued from each of the host terminals, any print data sent from each of the host terminals is stored in the print server for print out by the network printer in order. Therefore, well-ordered printing is executed by the network printer even if a print command is issued from a host terminal during print data transmission from another host terminal or during printing another print data for another host terminal.
Any print data from the host terminal is transmitted to the network printer via a print port of the network printer. The print port is previously designated as a destination of print data in the printer driver of each of the host terminals connected to the network. When a single network printer is shared, the print port assigned to the network printer is respectively designated as the destination in each of the host terminals.
FIG. 6 is a flowchart showing a procedure of print data transmission from the host terminal to the network printer having a built-in print server. Any print data is directly transmitted from the host terminal to the network printer.
As shown in FIG. 6, a connection request command (SYN) is first sent form the host terminal to the network printer as designating the print port as the destination. In response, a connection acknowledgement (SYN-ACK) is returned from the network printer to the host terminal, thereby establishing the connection via the print port. Then print data in a packet unit is transmitted from the host terminal to the network printer in order.
Upon completion of print data transmission, a finish command (FIN) is sent from the host terminal to the network printer. In response, a finish acknowledgement (FIN-ACK) is returned from the network printer to the host terminal, thereby terminating the connection via the print port. Print data as such transmitted to the network printer are stored in an internal buffer (a built-in print server) of the network printer for print out in order.
An acknowledgement (ACK) from the network printer, not shown in FIG. 6, is received by the host terminal whenever a packet of print data (a print data packet) is transmitted. When the acknowledgment is received, another print data packet is transmitted. If the acknowledgement is not received by the host terminal within a predetermined time-out period T1 (five seconds, for example), the failed print data packet is retried by the host terminal as shown in FIG. 7.
On the side of the network printer, if another print data packet is not received within a predetermined time-out period T2 (five minutes, for example), a reset command (RST) is sent to the host terminal to forcibly disconnect the host terminal from the print port of the network printer. The connection of the host terminal via the print port is determined to have a network failure. The reset command causes the print port to be opened to the other host terminals. The print port is otherwise still occupied by the host terminal possibly having the network failure, preventing the other host terminals from using the network printer.
The finish command (FIN) is, however, not retried even if the time-out period T1 elapses. If the FIN command from the host terminal is lost due to a network failure, the connection established with the particular host terminal is kept until the reset command (RST) is sent from the network printer only after the time-out period T2 elapses. This raises a problem preventing the other host terminals from using the network printer until the time-out period T2 elapses even if transmission of print data from the host terminal has been successfully completed.
In a well-known conventional art, when a print data transmission error is detected, another communication path is established between an information processing apparatus and a printer with the failed communication path kept connected therebetween, allowing the information processing apparatus to obtain status information of the printer (refer to Japanese patent application publication No. H10-40025). According to the disclosure, if status information as such detected is a paper jam, a printer cover open, or a paper failure (showing that a desired size of paper is not set), the printer is determined to be disabled, and print data transmission is thereby terminated by the information processing apparatus.
According to the disclosure, it would be possible to control the connection (the communication path) depending on the printer status to thereby terminate print data transmission when the printer is temporarily inactive. If, however, a network failure occurs on the connection via the print port after successful completion of print data transmission, the print port is kept occupied by the particular host terminal, preventing the other host terminals from using the network printer.